# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=freealut
pkgver=1.1.0
pkgrel=1
pkgdesc="OpenAL Utility Toolkit (ALUT)"
url="https://github.com/vancegroup/freealut"
arch="all"
license="GPL-2.0-or-later"
makedepends="autoconf automake libtool openal-soft-dev"
subpackages="$pkgname-dev"
options="!check" # No testsuite
source="https://github.com/vancegroup/freealut/archive/freealut_${pkgver//./_}.tar.gz
	0000-configure.patch
	0001-freebsd_pthread.patch
	0002-am_maintainer_mode.patch
	0003-findutils_syntax.patch
	"
builddir="$srcdir/$pkgname-${pkgname}_${pkgver//./_}"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="c9dead230434b3916f91e219913c2b2c877c4594d74b63641246a6704e28fe8d415131127cc00b51355f2fdf4e2bbf8aaf2b802fec479b05927e39a8698c251e  freealut_1_1_0.tar.gz
6a291791660e45bea0000cb6adec5e8ddbdf405da95ab45ef05eda191ea412b57752d9e12afd34741d455bdd3aaa0faaf2c3be8467550e1216677c9b1a82ff66  0000-configure.patch
ed21300ea329daed93db27bbd14385cbc97057dc810a88508c5dda7e5e383350df4caeed66908be3868d66d64536c3b1d13ef2dc15e4efcda04285544c54a8be  0001-freebsd_pthread.patch
38b7ed8d66ffe4b3cd38641c821f7b0a055d62d104d04e3f62c4baf0fe5aad27107427365b082222d2be9dbc2d9416de31408c41a35126e8398b56c188bacffc  0002-am_maintainer_mode.patch
7fe5bba0e23d10319552afd77dfde41633411f1c3d9ad66559f65230c758440a2987b7472fb4a3323a811575a14736f1ab476aa47dff993e6d81a1196274f230  0003-findutils_syntax.patch"
